#pragma once

#include <vgraph>

struct PageLayoutEntry
{
	PageLayoutEntry(){}
	PageLayoutEntry(int h_pageindex,int v_pageindex,const Point& viewpoint)
	{
		this->h_pageindex = h_pageindex;
		this->v_pageindex = v_pageindex;
		this->viewpoint = viewpoint;
	}
	int h_pageindex;
	int v_pageindex;
	Point viewpoint;
};
typedef std::vector<PageLayoutEntry> PageLayoutEntries;

struct PageLayoutInfo
{
	PageLayoutInfo(){h_pagecount = 0; v_pagecount = 0;}
	int h_pagecount;
	int v_pagecount;
	PageLayoutEntries pages;
};

class PageLayout
{
public:
	PageLayout(){}
	PageLayout(const Size& canvasSize,const Size& pagesize,int pagecount,const Point& viewpoint);
	virtual void Layout();
	const PageLayoutInfo& GetResult() const;

private:
	Size canvasSize;
	Size pagesize;
	int pagecount;
	Point viewpoint;
	PageLayoutInfo m_pagelayoutinfo;
};